import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'package:library_base/entities/generated/json/task_detail_entity.g.dart';
import 'package:library_base/entities/suppliers_shops_list_entity.dart';
import 'dart:convert';

import 'package:library_base/entities/task_detail_child_entity.dart';

@JsonSerializable()
class TaskDetailEntity {
  late List<TaskDetailChildEntity> details;

  late String id;
  late String purchaseOrderNumber;
  String? supplierId;
  late String supplierName;
  String? warehouseId;
  late String warehouseName;
  late String shipperId;
  late String shipperName;
  late String remark;
  SuppliersShopsListEntity? shop;

  TaskDetailEntity();

  factory TaskDetailEntity.fromJson(Map<String, dynamic> json) => $TaskDetailEntityFromJson(json);

  Map<String, dynamic> toJson() => $TaskDetailEntityToJson(this);

  @override
  String toString() => json.encode(this);
}
